import { createSSRApp } from 'vue'
import App from './App.vue'
import pinia from '@/store'
import share from '@/common/share.js'

/* #ifdef H5*/
import wx from 'weixin-js-sdk'
/* import Vconsole from 'vconsole'
 new Vconsole()*/
/* #endif*/

export function createApp() {
  const app = createSSRApp(App)
  /* #ifdef H5*/
  app.config.globalProperties.$wx = wx
  /* #endif*/
  app.config.warnHandler = () => null
  app.use(pinia)
  app.mixin(share)
  return {
    app
  }
}
